<?php
require_once('conn.inc.php');
@$conn		=		mysql_connect($db_host,$db_user,$db_pwd);
mysql_query("set names 'utf8'");
mysql_select_db($db_name);

@$id 	=	 	$_POST["id"];

$find = "select * from home where fid='$id' && state='1' ";
$result = mysql_query($find);
$num_rows = mysql_num_rows($result);
if ($num_rows >= 1) {
	$rc = array('code'=>0);
	echo json_encode($rc);										//已经创建过房间
}else {
	$rc = array('code'=>1);										//
	echo json_encode($rc);										
}